<!DOCTYPE html><!--suppress ALL-->
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head-fragment">
    <meta charset="utf-8">
    <title th:text="| ${blogDetailVO ne null ? blogDetailVO.blogTitle + ' - ' + configurations.get('websiteName') : '主页 - ' + configurations.get('websiteName')}|">主页</title>
    <meta name="description" th:content="${configurations.get('websiteDescription')}">
    <meta content="Spring Boot Java 轻量级 博客 好看 Amaze UI MySQL" name="keywords">
    <link rel="shortcut icon" th:href="@{${configurations.get('websiteIcon')}}"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,shrink-to-fit=no">
    <meta http-equiv="Window-target" content="_top"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-title" th:content="${configurations.get('websiteName')}"/>
    <meta name="msapplication-TileColor" content="#0e90d2">
    <link rel="stylesheet" th:href="@{/blog/amaze/css/base.css}">
    <link rel="stylesheet" th:href="@{/blog/amaze/css/amazeui.css}">
    <link rel="stylesheet" th:href="@{/blog/amaze/css/app.css}">
    <link rel="stylesheet" th:href="@{/blog/amaze/css/all.min.css}">
    <script th:src="@{/blog/plugins/jquery/jquery.min.js}"></script>
    <script th:src="@{/blog/amaze/js/amazeui.min.js}"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
    <script src="https://cdn.jsdelivr.net/npm/axios@0.24.0/dist/axios.min.js"></script>

    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?dc8b4702da40108b2ee0d86a4fac110d";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<header th:fragment="header-fragment" class=" am-topbar am-topbar-inverse am-topbar-fixed-top">
    <div class="amz-container app-header">
        <h1 class="am-topbar-brand">
            <a class="navbar-brand" href="/" th:text="${configurations.get('websiteName')}"></a>
          <!--  <a href="/">
                <img th:src="@{/blog/amaze/images/website.png}" style="width: 60%;" th:alt="dddpeterLogo">
            </a>-->
        </h1>
        <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
                data-am-collapse="{target: '#doc-topbar-collapse-5'}">
            <span class="am-sr-only">
                导航切换
            </span>
            <span class="am-icon-bars">
            </span>
        </button>
        <div class="am-collapse am-topbar-collapse navbar-left" id="doc-topbar-collapse-5">
            <ul class="am-nav am-nav-pills am-topbar-nav" id="nav">
                <li id="index" >
                    <a th:href="@{/index}">
                        首页
                    </a>
                </li>

                <li class="am-dropdown" data-am-dropdown="" id="category">
                    <a class="am-dropdown-toggle" data-am-dropdown-toggle="" href="javascript:;">
                        分类
                        <span class="am-icon-caret-down">
                        </span>
                    </a>
                    <ul class="am-dropdown-content">
                        <th:block th:if="${null != categories && categories.size() > 0}">
                            <th:block th:each="item,iterStat : ${categories}">
                                <li>
                                    <a th:href="${'/category/' + item.categoryName}">
                                        <th:block th:text="${item.categoryName}"></th:block>
                                    </a>
                                </li>
                            </th:block>
                        </th:block>
                    </ul>
                </li>
                <li id="opensource">
                    <a th:href="@{/opensource}" >
                        工具
                    </a>
                </li>

                <li id="about">
                    <a th:href="@{/about}" >关于</a>
                </li>

            </ul>
        </div>
    </div>
    <script>
        var url = window.location.pathname
        console.log(url)
        if(url=='/' || url.startsWith("/index")){
            $('#index').addClass('am-active');
        }
        else if(url.startsWith('/category')){
            $('#category').addClass('am-active');
        }
        else if(url.startsWith('/opensource')){
            $('#opensource').addClass('am-active');
        }

        else if(url.startsWith('/about')){
            $('#about').addClass('am-active');
        }
        else{
            $('#index').addClass('am-active');
        }
    </script>
</header>
</html>